/* These are the bits that are set in the Component flags, and also in the codecInfo struct. */
enum {
codecInfoDoes1 = (1L << 0),
codecInfoDoes2 = (1L << 1),
codecInfoDoes4 = (1L << 2),
codecInfoDoes8 = (1L << 3),
codecInfoDoes16 = (1L << 4),
codecInfoDoes32 = (1L << 5),
codecInfoDoesDither = (1L << 6),
codecInfoDoesStretch = (1L << 7),
codecInfoDoesShrink = (1L << 8),
codecInfoDoesMask = (1L << 9),
codecInfoDoesTemporal = (1L << 10),
codecInfoDoesDouble = (1L << 11),
codecInfoDoesQuad = (1L << 12),
codecInfoDoesHalf = (1L << 13),
codecInfoDoesQuarter = (1L << 14),
codecInfoDoesRotate = (1L << 15),
codecInfoDoesHorizFlip = (1L << 16),
codecInfoDoesVertFlip = (1L << 17),
codecInfoDoesSkew = (1L << 18),
codecInfoDoesBlend = (1L << 19),
codecInfoDoesWarp = (1L << 20),
codecInfoDoesRecompress = (1L << 21),
codecInfoDoesSpool = (1L << 22),
codecInfoDoesRateConstrain = (1L << 23)
};
enum {
codecInfoDepth1 = (1L << 0),
codecInfoDepth2 = (1L << 1),
codecInfoDepth4 = (1L << 2),
codecInfoDepth8 = (1L << 3),
codecInfoDepth16 = (1L << 4),
codecInfoDepth32 = (1L << 5),
codecInfoDepth24 = (1L << 6),
codecInfoDepth33 = (1L << 7),
codecInfoDepth34 = (1L << 8),
codecInfoDepth36 = (1L << 9),
codecInfoDepth40 = (1L << 10),
codecInfoStoresClut = (1L << 11),
codecInfoDoesLossless = (1L << 12),
codecInfoSequenceSensitive = (1L << 13)
};
enum {
codecFlagUseImageBuffer = (1L << 0),
codecFlagUseScreenBuffer = (1L << 1),
codecFlagUpdatePrevious = (1L << 2),
codecFlagNoScreenUpdate = (1L << 3),
codecFlagWasCompressed = (1L << 4),
codecFlagDontOffscreen = (1L << 5),
codecFlagUpdatePreviousComp = (1L << 6),
codecFlagForceKeyFrame = (1L << 7),
codecFlagOnlyScreenUpdate = (1L << 8),
codecFlagLiveGrab = (1L << 9),
codecFlagDontUseNewImageBuffer = (1L << 10),
codecFlagInterlaceUpdate = (1L << 11),
codecFlagCatchUpDiff = (1L << 12),
codecFlagUsedNewImageBuffer = (1L << 14),
codecFlagUsedImageBuffer = (1L << 15)
};
enum {
/* The minimum data size for spooling in or out data */
codecMinimumDataSize = 32768
};
enum {
compressorComponentType = 'imco', /* the type for "Components" which compress images */
decompressorComponentType = 'imdc'
};
typedef Component CompressorComponent;
typedef Component DecompressorComponent;
typedef Component CodecComponent;
#define anyCodec ((CodecComponent)0)
#define bestSpeedCodec ((CodecComponent)-1)
#define bestFidelityCodec ((CodecComponent)-2)
#define bestCompressionCodec ((CodecComponent)-3)
typedef long CodecType;
typedef unsigned short CodecFlags;
typedef unsigned long CodecQ;
enum {
codecLosslessQuality = 0x400L,
codecMaxQuality = 0x3ffL,
codecMinQuality = 0x000L,
codecLowQuality = 0x100L,
codecNormalQuality = 0x200L,
codecHighQuality = 0x300L
};
enum {
codecCompletionSource = (1 << 0), /* asynchronous codec is done with source data */
codecCompletionDest = (1 << 1) /* asynchronous codec is done with destination data */
};
enum {
codecProgressOpen = 0,
codecProgressUpdatePercent = 1,
codecProgressClose = 2
};
typedef pascal OSErr (*ICMDataProcPtr)(Ptr *dataP, long bytesNeeded, long refcon);
typedef pascal OSErr (*ICMFlushProcPtr)(Ptr data, long bytesAdded, long refcon);
typedef pascal void (*ICMCompletionProcPtr)(OSErr result, short flags, long refcon);
typedef pascal OSErr (*ICMProgressProcPtr)(short message, Fixed completeness, long refcon);
typedef pascal void (*StdPixProcPtr)(PixMap *src, Rect *srcRect, MatrixRecord *matrix, short mode, RgnHandle mask, PixMap *matte, Rect *matteRect, short flags);
typedef pascal void (*ICMAlignmentProcPtr)(Rect *rp, long refcon);
extern pascal void DragAlignedWindow(WindowPtr wp, Point startPt, Rect *boundsRect, Rect *alignmentRect, ICMAlignmentProcRecordPtr alignmentProc)
FOURWORDINLINE(0x203C, 0x14, 0x4E, 0xAAA3);
extern pascal long DragAlignedGrayRgn(RgnHandle theRgn, Point startPt, Rect *boundsRect, Rect *slopRect, short axis, UniversalProcPtr actionProc, Rect *alignmentRect, ICMAlignmentProcRecordPtr alignmentProc)